<tagLib name="html" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改会员</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:190px; border:1px solid #ccc; padding:2px;}
		.select{width:190px; border:1px solid #ccc; height:25px; padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			if($('#vip_c').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入手机号码',timeout:5000,showType:'slide'});
				return false;
			}
			if($('#title').val()=='')
			{
				$.messager.show({title:'提示',msg:'请输入名称',timeout:5000,showType:'slide'});
				return false;
			}
			return true;
		}
		
		function calc_point()
		{
			var act_point = $('#act_point').val();
			if(act_point=='')
			{
				$('#point').attr('value',$('#old_point').val());
				return false;
			}
			else if(isNaN(act_point))
			{
				$.messager.show({title:'提示',msg:'积分输入错误',timeout:5000,showType:'slide'});
				$('#act_point').attr('value','');
				$('#point').attr('value',$('#old_point').val());
				return false;
			}
			else
			{
				var old_point = $('#old_point').val();
				var new_point = parseFloat(act_point) + parseFloat(old_point);
				$('#point').attr('value',new_point);
			}
		}
	</script>
</head>
<body class="">
	<div class="demo-info space-out-10px">
		<div class="demo-tip icon-tip"></div>
		<div>修改会员</div>
	</div>
	<form id="form1" method="post" action="{:U('Vip/data_edit_save')}" onsubmit="return chkfrm()">
	
	<ul class="idTabs space-out-10px"> 
		<li><a href="#tabs_basic">基本信息</a></li>
	</ul>
	<div id="tabs_basic">
		<table class="space-out-10px">
		<tr>
		<td style="width:100px;">手机号码：</td><td><input type="text" id="vip_c" name="vip_c" class="easyui-validatebox input" value="{$mydata.vip_c}" readonly required="true" /></td>
		</tr>
		
		<tr>
		<td>名称：</td><td><input type="text" id="title" name="title" class="easyui-validatebox input" value="{$mydata.title}" required="true" /></td>
		</tr>
		
		<tr>
		<td>QQ：</td><td><input type="text" id="qq" name="qq" class="input" value="{$mydata.qq}" /></td>
		</tr>
		
		<tr>
		<td>邮箱：</td><td><input type="text" id="email" name="email" class="input" value="{$mydata.email}" /></td>
		</tr>
		
		<tr>
		<td>微信：</td><td><input type="text" id="weixin" name="weixin" class="input" value="{$mydata.weixin}" /></td>
		</tr>
		
		<tr>
		<td>生日：</td><td><input type="text" id="birthday" name="birthday" class="easyui-datebox input"  editable="false" value="{$mydata.birthday|get_date='Y-m-d',###}" style="width:190px" /></td>
		</tr>
		
		<tr>
		<td>备注：</td><td><input type="text" id="remark" name="remark" class="input" value="{$mydata.remark}" /></td>
		</tr>
		
		<tr>
		<td>状态：</td><td><input type="radio" name="status_flg" value="Y"<if condition="$mydata['status_flg'] eq 'Y'"> checked</if> />正常  <input type="radio" name="status_flg" value="N"<if condition="$mydata['status_flg'] eq 'N'"> checked</if> />禁用</td>
		</tr>
		
		<tr>
		<td>&nbsp;</td><td>--------------------------------------------------------------------------------------------</td>
		</tr>
		
		<tr>
		<td>现有积分：</td><td><input type="text" id="old_point" name="old_point" class="input" value="{$mydata.point}" readonly /></td>
		</tr>
		
		<tr>
		<td>调整积分：</td><td><input type="text" id="act_point" name="act_point" class="input" value="" onchange="calc_point()" />增加积分填正数，减少积分填负数</td>
		</tr>
		
		<tr>
		<td>调整积分说明：</td><td><input type="text" id="act_remark" name="act_remark" class="input" value="" /></td>
		</tr>
		
		<tr>
		<td>积分：</td><td><input type="text" id="point" name="point" class="input" value="{$mydata.point}" readonly /></td>
		</tr>
		
		</table>	

		
	</div>
	
	
		<table class="space-out-10px">
		<tr>
		<td>&nbsp;</td><td>&nbsp;</td>
		</tr>
		<tr>
		<td>&nbsp;</td><td>
		<input type="hidden" id="id" name="id" value="{$mydata.id}" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="$('#form1').submit();">保存</a>
		<a href="{:U('Vip/data_list')}" class="easyui-linkbutton" iconCls="icon-undo">取消</a>
		</td>
		</tr>
		</table>
		

	</form>

</body>
</html>
